﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="StarsPodrobnosti.aspx.cs" Inherits="Sio.Mdm.Web.Uporabnik.StarsPodrobnosti" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Starš</title>
</head>
<body>
    <form id="form1" runat="server">
    <ext:ResourceManager ID="ResourceManager2" runat="server" >
      <Listeners>
        <DocumentReady Handler="TabStarsPodrobnosti.addTab(OtrociGrid);" />
      </Listeners>
    </ext:ResourceManager>
    <ext:Viewport ID="Viewport1" runat="server" Layout="Border">
      <Items>
        <ext:Panel ID="OFormPanel3" runat="server" Padding="6" Border="false" LabelAlign="Top" Region="North" Height="90" >   
          <Items>                                      
            <ext:fieldset ID="OFieldset3" runat="server" title="Osebni podatki" layout="form" Width="625" >
              <Items>
                <ext:Panel ID="Panel3" runat="server" Width="600" Border="false" >
                  <Items>
                    <ext:Container ID="Container1" runat="server" Layout="Column" Height="45">
                      <Items>
                        <ext:Container ID="Container2" runat="server" LabelAlign="Top" Layout="Form" ColumnWidth=".3">
                          <Items>
                            <ext:TextField ID="tfTelefon" DataIndex="Telefon" runat="server" FieldLabel="Telefon" AnchorHorizontal="95%"/>
                          </Items>
                        </ext:Container>
                        <ext:Container ID="Container3" runat="server" LabelAlign="Top" Layout="Form" ColumnWidth=".3">
                          <Items>
                            <ext:TextField ID="tfTelefonSluzba" DataIndex="TelefonSluzba" runat="server" FieldLabel="Telefon - Služba" AnchorHorizontal="95%"/>  
                          </Items>
                        </ext:Container>
                        <ext:Container ID="Container7" runat="server" LabelAlign="Top" Layout="Form" ColumnWidth=".4">
                          <Items>
                            <ext:TextField ID="tfEmail" DataIndex="ENaslov" runat="server" FieldLabel="E-naslov" AnchorHorizontal="95%"/>  
                          </Items>
                        </ext:Container>
                      </Items>
                    </ext:Container>                              
                  </Items>                          
                </ext:Panel>
              </Items>
            </ext:fieldset>
          </Items>
        </ext:Panel>
             
        <ext:Panel ID="Panel2" runat="server" Padding="6" Border="false" LabelAlign="Top" Region="Center" layout="form">   
          <Items>
            <sio:TabPanel runat="server" ID="TabStarsPodrobnosti" >
				      <Items>
				        <sio:GridPanel ID="OtrociGrid" runat="server" StripeRows="true" TrackMouseOver="true"  Height="200" Title="Otroci">
           			  <Store>
			              <ext:Store ID="StoreOtrociSeznam" runat="server">
			                <Reader>
				                <ext:JsonReader IDProperty="ID">
					                <Fields>      						
						                <ext:RecordField Name="VlogaId" Type="int" />
						                <ext:RecordField Name="Otrok" Type="string" />
						                <ext:RecordField Name="DatumRojstva" Type="Date" DateFormat="dd.mm.yyyy"/>
						                <ext:RecordField Name="Razred" Type="string" />
					                </Fields>
				                </ext:JsonReader>
			                </Reader>
			              </ext:Store>
		              </Store>
      	          <ColumnModel ID="ColumnModel1" runat="server">
		                <Columns>
			                <ext:RowNumbererColumn />
			                <ext:Column ColumnID="VlogaId" Hidden="false" Hideable="false" DataIndex="VlogaId"></ext:Column>			
			                <ext:Column Header="Otrok" DataIndex="Otrok"></ext:Column>
			                <ext:Column Header="Datum rojstva" DataIndex="DatumRojstva"></ext:Column>
			                <ext:Column Header="Razred" DataIndex="Razred"></ext:Column>
			                <ext:CommandColumn Width="35">
                        <Commands>
                          <ext:GridCommand Icon="NoteEdit" CommandName="Uredi"><ToolTip Text="Uredi" /></ext:GridCommand>
                        </Commands>
                      </ext:CommandColumn>
		                </Columns>
		              </ColumnModel>
		              <Listeners>
		                <%--<Command Handler="Ext.Msg.alert(command, record.data.VlogaId);" />--%>
                    <Command Handler="parent.addTab(parent.TabNavigation, 'idPodrobnosti'+record.data.VlogaId, 'UceciPodrobnosti.aspx?vlogaId='+record.data.VlogaId,'Podrobnosti '+ record.data.Otrok);" />
                  </Listeners>

                 <%-- <Listeners>         
                    <Command Handler= "parent.addTab(parent.TabNavigation, 'idPodrobnosti', 'UceciPodrobnosti.aspx?vlogaId='+record.data.VlogaId,'Podrobnosti '+ record.data.Otrok);"/>
                  </Listeners>	--%>
                  <LoadMask ShowMask="true" />
                  <SelectionModel>
                    <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" />
                  </SelectionModel>    
                </sio:GridPanel>  				    
				      </Items> 
		        </sio:TabPanel>
		    
		        <ext:Panel ID="Panel5" runat="server" Border="false" Region="South" BodyStyle="background-color: #CCE7CE; border-bottom: 1px solid #d0d0d0; "  >   
              <Items>
                <ext:Panel ID="Panel6" runat="server" Border="false" ButtonAlign="Left" >   
                  <Buttons>
                    <sio:Button ID="btnShrani" runat="server" Text="Shrani" Icon="Accept" >
                    </sio:Button>  
                    <sio:Button ID="btnPreklici" runat="server" Text="Prekliči" Icon="Decline" >
                    </sio:Button>
		              </Buttons>                         
                </ext:Panel>
              </Items>
            </ext:Panel>
		    
		      </Items>
        </ext:Panel>
      </Items>        
    </ext:Viewport>
  </form>
</body>
</html>
